import request from '../../request.js';

/**
 * 地址列表
 */
function findAllAddress() {
	return request({
		url: "/lejuClient/address/findAllAddress"
	});
}

/**
 * 新增地址
 * @param {Object} data
 */
function addAddressInfo(data) {
	return request({
		url: '/lejuClient/address/addAddressInfo',
		method: "POST",
		data
	});
}
/**
 * 修改保存地址
 * @param {Object} data
 */
function updateAddressInfo(data) {
	return request({
		url: '/lejuClient/address/updateAddressInfo',
		method: "POST",
		data
	});
}

/**
 * 删除地址
 * @param {Object} addressId
 */
function delAddressInfo(addressId) {
	return request({
		url: `/lejuClient/address/delAddressInfo/${addressId}`,
		method: 'DELETE'
	});
}

export {
	findAllAddress,
	addAddressInfo,
	updateAddressInfo,
	delAddressInfo
}
